#ifndef __SKILL_FACTORY_H__
#define __SKILL_FACTORY_H__

#pragma once

#include <Singleton.h>
#include <MemoryPoolFactory.h>

using namespace util;

class SkillScriptInfo;
class InstantSkill;
class DelayedSkill;
class StyleSkill;
class PassiveSkill;
class NormalAttack;

class SkillFactory : public Singleton<SkillFactory>
{
public:
	SkillFactory();
	virtual ~SkillFactory();

	VOID			Init( DWORD dwPlayerPoolSize, DWORD dwNPCPoolSize );
	VOID			Release();
	Skill*			AllocSkill( eSKILL_TYPE eSkillType, SkillScriptInfo *pBaseSkillInfo=NULL );
	VOID			FreeSkill( Skill* pSkill );

	VOID			DisplayPoolInfo();

private:
	CMemoryPoolFactory<StyleSkill> *		m_pStylePool;
	CMemoryPoolFactory<InstantSkill> *		m_pInstantPool;
	CMemoryPoolFactory<DelayedSkill> *		m_pDelayedPool;
	CMemoryPoolFactory<PassiveSkill> *		m_pPassivePool;
	CMemoryPoolFactory<NormalAttack> *		m_pNormalPool;
};

#endif
